package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.FlashSale;
import com.nbsaas.boot.marketing.api.domain.simple.FlashSaleSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 秒杀活动-列表对象转换器
*/

public class FlashSaleSimpleConvert implements Converter<FlashSaleSimple, FlashSale> {




@Override
public FlashSaleSimple convert(FlashSale source) {
    FlashSaleSimple result = new FlashSaleSimple();

                result.setCode(source.getCode());
                result.setName(source.getName());
                result.setCurrentParticipants(source.getCurrentParticipants());
                result.setDescription(source.getDescription());
                result.setStartTime(source.getStartTime());
                result.setEndTime(source.getEndTime());
                result.setId(source.getId());
                result.setAddDate(source.getAddDate());
                result.setStatus(source.getStatus());
                result.setMaxParticipants(source.getMaxParticipants());
                result.setLastDate(source.getLastDate());


    return result;
}

}